{%extends 'base.html'%}
{%block body%}
      <a href="/index/" class="list-header-1">
        <img src="/static/images/返回.png" class="list-img-return">
      </a>
      <img src="/static/images/项目.png" class="list-header-2">
      <div class="list-jizhan">
      <a class="list-aa" href="#"><span class="list-header-span1">基站状态清单</span></a>
      </div> 
      <span class="list-header-span2">项目名称:</span>
      <span class="list-header-span3">{{ProjectName}}</span>
      <span class="list-header-span4">合同号:</span>
      <span class="list-header-span5">123456789</span>
      <span class="list-header-query">项目搜索:</span>
      <input type="text" disabled="disabled" class="list-header-input1">
      <input type="text" class="list-header-input2" placeholder="项目名/运营商/地域">
    </header>
      <div class="list-jizhan2">
	<a href="/details/?ProjectName={{ProjectName}}" class="list-aa"><span class="list-header2-span1">项目进展详情</span></a>
      </div>
    <section>
      <a id="dlink" download="myexcel.xls" style="display:none"></a>
      <button name="button" class="bttn list-section-btn1" id="list-bn1">导出表格</button>
      <table class="list-table" id="tableExcel">
        <thead>
          <tr>
            <th>序号</th><th>SiteID</th><th>地点</th><th>状态</th><th>测试人</th><th>测试时间</th>
          </tr>
        </thead>
        <tbody>
	{% for file in files %}
	  <tr>
	    <td>{{file.Number}}</td><td>{{file.siteID}}</td><td>{{file.address}}</td><td>{{file.status}}</td><td>{{file.testuser}}</td><td>{{file.date}}</td>
	  </tr>
	{% endfor %}
        </tbody>
      </table>
      <div class="pagination">
	<span class="step-links">
	  {% if previousPage %}
	    <a href="?page={{previousPage}}&ProjectName={{ProjectName}}">上一页</a>
	  {% endif %}
	  <span class="current">
	    第{{newPage}}页
	  </span>
	  <span class="current">
	    共{{PageNumber}}页
	  <span>
	  {% if nextPage %}
	    <a href="?page={{nextPage}}&ProjectName={{ProjectName}}">下一页</a>
	  {% endif %}
	</span>
        {% if PageNumber > 2%}
	<span>跳转页面</span><input type="text" class="list-input"><button class="bttn list-b">确定</button>
	{% endif %}
      </div>
    </section>
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/list.js"></script>
    <script type="text/javascript">
	window.onload = function () {
        $('.list-b').click(function () {
	    var dd = $('.list-input').val();
 	    var reg = /^[1-9][0-9]*$/;
	    if(!reg.test(dd)){
		alert("请输入正确格式页码！");
	    }else if (dd > {{PageNumber}}){
		alert("请输入范围内的页码！");
	    }else {
		window.location.href='?page='+dd+'&ProjectName={{ProjectName}}';
  	    }
	    
        });
        }
    </script>
{%endblock body%}
